<!DOCTYPE html>
<html lang="en">
<head>
    {%
    function slash(path) {
        if (!path) {  return ''; }
        if(!/\/$/.test(path)) { return path + '/'; }
    }
    %}
    <meta charset="UTF-8">
    <title>{%= o.htmlWebpackPlugin.options.title %}</title>
    {% if(o.htmlWebpackPlugin.options.devServerEnabled) { %}
    <script src="{%= o.htmlWebpackPlugin.options.serverPath +'/webpack-dev-server' %}.js"></script>
    {% } %}
    {%

    var src;
    var options = o.htmlWebpackPlugin.options;
    for (var i = 0; i < options.scriptList.length; i++) {
    src = (options.serverPath || '') + slash(options.publicPath) + options.scriptList[i];
    %}

    <script src="{%= src %}.js"></script>

    {% } %}
</head>
<body>
<div id="main"></div>

</body>
</html>